package org.wzys.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.wzys.Pojo.Product;
import org.wzys.Pojo.ProductQueryparm;

import java.util.List;

@Mapper
public interface ProductMapper {
    List<Product> list(ProductQueryparm productQueryparm);

    void insert(Product product);

    void deleteBatch(List<Integer> ids);

    Product selectByPrimaryKey(Integer id);

    void updateByPrimaryKey(Product product);

    @Update("update product set quantity = #{i} where product_id = #{productId}")
    void updateStock(Integer productId, int i);
}
